import Vue from 'vue';
import Vuex from 'vuex'
Vue.use(Vuex)
import store from '@/common/js/store.js';
export default new Vuex.Store({
  state: {
    planconstantMap: {},
    planDetail:{},
    notifyList: []
  },
  modules: {
    store,
    setplanDetail: (state, planDetail) => {
      state.planDetail = planDetail
    },
    setplanconstantMap: (state, planconstantMap) => {
      state.planconstantMap = planconstantMap
    },
    setNotifyList({ commit }, constant) {
      commit('setNotifyList', constant);
    },
  },
  actions:{
    setplanDetail ({ commit }, planDetail) {
      commit('setplanDetail', planDetail)
    },
    setplanconstantMap ({ commit }, planconstantMap) {
      commit('setplanconstantMap', planconstantMap)
    },
    setNotifyList(state, val) {
      state.notifyList = val;
    },
  }
}); 